package com.jprocms.module.cms.controller.admin.investigate.vo;

import com.jpro.framework.common.pojo.PageParam;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Collection;
import java.util.Date;

import static com.jpro.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 问卷调查分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class InvestigatePageReqVO extends PageParam {

    @Schema(description = "站点ID", example = "6855")
    private Long siteId;

    @Schema(description = "标题")
    private String title;

    @Schema(description = "开始日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private Date[] beginDate;

    @Schema(description = "结束日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private Date[] endDate;

    //service组装给xml使用，前端用 releaseTime 传递
    @Schema(description = "开始日期查询开始时间")
    private Date beginDateStart;

    @Schema(description = "开始日期查询结束时间")
    private Date beginDateEnd;


    @Schema(description = "是否启用")
    private Boolean enabled;

    @Schema(description = "当前时间")
    private Date now;

    @Schema(description = "是否有效期内查询")
    private Boolean isActive;
    //后端组装构建排序
    private Collection<OrderItem> orderItems;

}
